package com.landun.market.pojo.domain;

import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @author jiang.chuan
 * @date 2018-05-11
 */
@Data
@NoArgsConstructor
public class AccessToken {
    // 授权令牌
    private String accessToken;

    // 授权令牌类型
    private String tokenType = "bearer";

    // token有效期，单位为秒。
    private int expiresIn;

    // 刷新授权令牌的令牌
    private String refreshToken;

    @Builder
    public AccessToken(String accessToken, int expiresIn) {
        this.accessToken = accessToken;
        this.tokenType = "bearer";
        this.expiresIn = expiresIn;
    }
}
